const prototype = {
    getName: function () {
        return this.first + '' + this.lastName
    },
    say: function () {
        alert('hello');
    }
}

// 基于原型创建 X
let x = Object.create(prototype);
x.first = 'A';
x.last = 'B';
alert(x.getName());
x.sya();

// 基于原型创建 Y
let y = Object.create(prototype);
y.first = 'C';
x.last = 'D';
alert(y.getName());
y.say();